﻿using System;
using System.Collections.Generic;
using System.Text;

namespace C4F.DevKit.Telephony
{

    /// <summary>
    /// Represents a call.
    /// </summary>
    public class CallInfo
    {

        #region Internal Members

        /// <summary>
        /// Id of the caller party.
        /// </summary>
        internal string callerId;

        /// <summary>
        /// Id of the called party.
        /// </summary>
        internal string calledId;

        /// <summary>
        /// Direction of the call.
        /// </summary>
        internal CallDirection callDirection;

        /// <summary>
        /// State of the call.
        /// </summary>
        internal CallState callState;

        /// <summary>
        /// Hash code to uniquely identify a call.
        /// </summary>
        internal int hashCode;

        /// <summary>
        /// Represents the time when the call was initiated.
        /// </summary>
        internal DateTime callInitiateTime;

        /// <summary>
        /// Represents the time when the call was connected.
        /// </summary>
        internal DateTime startTime;

        /// <summary>
        /// Represents the time when the call was disconnected.
        /// </summary>
        internal DateTime endTime;

        /// <summary>
        /// Name of the communication line.
        /// </summary>
        internal string lineName;

        #endregion

        #region Public Properties

        /// <summary>
        /// Id of the caller party.
        /// </summary>
        public string CallerId
        {

            get { return this.callerId; }

        }

        /// <summary>
        /// Id of the called party.
        /// </summary>
        public string CalledId
        {

            get { return this.calledId; }

        }

        /// <summary>
        /// Direction of the call.
        /// </summary>
        public CallDirection CallDirection
        {

            get { return this.callDirection; }

        }

        /// <summary>
        /// State of the call.
        /// </summary>
        public CallState CallState
        {

            get { return this.callState; }

        }

        /// <summary>
        /// Represents the time when the call was initiated.
        /// </summary>
        public DateTime CallInitiateTime
        {

            get { return this.callInitiateTime; }

        }

        /// <summary>
        /// Represents the time when the call was connected.
        /// </summary>
        public DateTime StartTime
        {

            get { return this.startTime; }

        }

        /// <summary>
        /// Represents the time when the call was disconnected.
        /// </summary>
        public DateTime EndTime
        {

            get { return this.endTime; }

        }

        /// <summary>
        /// Name of the communication line.
        /// </summary>
        public string LineName
        {

            get { return this.lineName; }

        }

        #endregion

    }
}
